function outputShape = rotateToRefShape(inputShape, RefShape)
[U D V_t]=svd(inputShape*RefShape');
%rotMat = (V_t'*U')' this is incorrect
rotMat = (V_t'*U');
outputShape = (rotMat*inputShape);